package com.eastcom.bm.dataprocess.processor;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.eastcom.bm.atom.Atom_ActionEmailNotice;
import com.eastcom.bm.atom.Atom_ActionRule;
import com.eastcom.bm.atom.Atom_CalendarItem;
import com.eastcom.bm.atom.Atom_CalendarModel;
import com.eastcom.bm.atom.Atom_DatasetDefine;
import com.eastcom.bm.atom.Atom_DatasetNe;
import com.eastcom.bm.atom.Atom_KpiDefine;
import com.eastcom.bm.atom.Atom_NeSpecialThreadhold;
import com.eastcom.bm.atom.Atom_PublicNe;
import com.eastcom.bm.atom.CalendarPolicy;
import com.eastcom.bm.atom.DataAbnormal;
import com.eastcom.bm.atom.RawData;
import com.eastcom.common.db.ColumnRelation;
import com.eastcom.common.db.ObjRelationMapping;


public class ModelInfo {

	public static List classLst=new ArrayList();
	
	public static Map<Class,String> refClassKeyMap=new HashMap<Class,String>();
	
	public static ObjRelationMapping rawDataOrMapping;
    
	public static ObjRelationMapping unNormalRawDataOrMapping;
	
	static{
		initial();
	}
	
	public static void initial(){
		classLst.clear();
		refClassKeyMap.clear();
		
		classLst.add(Atom_PublicNe.class);
		classLst.add(Atom_NeSpecialThreadhold.class);		
		classLst.add(Atom_KpiDefine.class);
		classLst.add(Atom_DatasetNe.class);
		classLst.add(Atom_DatasetDefine.class);
		classLst.add(CalendarPolicy.class);
		classLst.add(Atom_CalendarModel.class);
		classLst.add(Atom_CalendarItem.class);
		classLst.add(Atom_ActionRule.class);
		classLst.add(Atom_ActionEmailNotice.class);
		
    	rawDataOrMapping=new ObjRelationMapping();
    	rawDataOrMapping.setTableName("qa_raw_data");
    	rawDataOrMapping.setEntityClass(RawData.class);
    	
    	ColumnRelation columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("dataset_id");
    	columnRelation.setParamName("datasetId");
    	columnRelation.setType("java.lang.String");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("ne_id");
    	columnRelation.setParamName("neId");
    	columnRelation.setType("java.lang.String");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("kpi_id");
    	columnRelation.setParamName("kpiId");
    	columnRelation.setType("java.lang.String");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("time_stamp");
    	columnRelation.setParamName("timeStamp");
    	columnRelation.setType("java.util.Date");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("collector_date");
    	columnRelation.setParamName("collectorDate");
    	columnRelation.setType("java.lang.Long");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("value");
    	columnRelation.setParamName("value");
    	columnRelation.setType("java.lang.Double");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("baseline_up");
    	columnRelation.setParamName("baselineUp");
    	columnRelation.setType("java.lang.Double");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("baseline_down");
    	columnRelation.setParamName("baselineDown");
    	columnRelation.setType("java.lang.Double");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("validation_type");
    	columnRelation.setParamName("validationType");
    	columnRelation.setType("java.lang.String");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("is_normal");
    	columnRelation.setParamName("isNormal");
    	columnRelation.setType("java.lang.String");
    	rawDataOrMapping.addColumnRelation(columnRelation);
    	
    	
    	unNormalRawDataOrMapping=new ObjRelationMapping();
    	unNormalRawDataOrMapping.setTableName("qa_data_abnormal");
    	unNormalRawDataOrMapping.setEntityClass(DataAbnormal.class); 
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("dataset_id");
    	columnRelation.setParamName("datasetId");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("kpi_id");
    	columnRelation.setParamName("kpiId");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("ne_id");
    	columnRelation.setParamName("neId");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("title");
    	columnRelation.setParamName("title");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("ne_type");
    	columnRelation.setParamName("neType");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("abnormal_type");
    	columnRelation.setParamName("abnormalType");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("abnormal_desc");
    	columnRelation.setParamName("abnormalDesc");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("data_time");
    	columnRelation.setParamName("dataTime");
    	columnRelation.setType("java.util.Date");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("time_stamp");
    	columnRelation.setParamName("timeStamp");
    	columnRelation.setType("java.util.Date");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("state");
    	columnRelation.setParamName("state");
    	columnRelation.setType("java.lang.String");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("INTEGRITY_RATIO");
    	columnRelation.setParamName("integrityRatio");
    	columnRelation.setType("java.lang.Double");
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("AVG_HISTORYVALUE");
    	columnRelation.setParamName("avgHistoryvalue");
    	columnRelation.setType("java.lang.Double");
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("VALUE");
    	columnRelation.setParamName("value");
    	columnRelation.setType("java.lang.Double");
    	
    	columnRelation=new ColumnRelation();
    	columnRelation.setColumnName("DIMENSION_NUM");
    	columnRelation.setParamName("dimensionNum");
    	columnRelation.setType("java.lang.Integer");
    	
    	unNormalRawDataOrMapping.addColumnRelation(columnRelation);
	}
	
}
